package main

import "fmt"

type Person81 struct {
	Name string
	Sex  byte
	Age  int
	int
}

func (person Person81) test81() {
	person.Name = "GGG"
	person.Sex = 15
	person.Age = 29
	fmt.Printf("test81() 内部: & = %p\n ", &person)
}

func (person *Person81) test82() {
	(*person).Name = "GGG"
	person.Sex = 15
	person.Age = 29

	fmt.Printf("test82() 内部:  %p\n ", person)
	fmt.Printf("test82() 内部: & = %p\n ", &person)

}

func main() {
	person81 := Person81{
		Name: "xdc",
		Sex:  1,
		Age:  2,
		int:  3,
	}
	fmt.Println(person81)
	fmt.Printf("init: & = %p\n ", &person81)

	fmt.Println()
	fmt.Println()
	fmt.Println()

	fmt.Println("调用值传递方法：")
	person81.test81()
	fmt.Println(person81)
	fmt.Printf("test81() main: & = %p\n ", &person81)

	fmt.Println()
	fmt.Println()
	fmt.Println()

	fmt.Println("调用引用传递方法：")
	person81.test82()
	fmt.Println(person81)
	fmt.Printf("test82() main: & = %p\n ", &person81)

}
